package service

import (
	"encoding/json"
	"go.uber.org/zap"
	"strings"
)

// 处理tag ids
func GetNewTags(str string) string {
	if str == "" {
		return ""
	}
	ids := []string{}
	err := json.Unmarshal([]byte(str), &ids)
	if err != nil {
		l.Error("service",
			zap.String("call", "json.Unmarshal"),
			zap.String("error", err.Error()),
			zap.String("params", str))
	}

	return strings.Join(ids, ",")
}
